package rc.work.module.infra.controller.admin.onlyoffice.officehistory.vo;

import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
import cn.idev.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

import static rc.work.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
import static rc.work.framework.common.util.date.DateUtils.TIME_ZONE_DEFAULT;

@Schema(description = "管理后台 - onlyoffice历史记录 Response VO")
@Data
@ExcelIgnoreUnannotated
public class OfficeHistoryRespVO {

    @Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "4890")
    @ExcelProperty("主键ID")
    private Long id;

    @Schema(description = "用户ID", example = "24243")
    @ExcelProperty("用户ID")
    private Long userId;

    @Schema(description = "服务器版本")
    @ExcelProperty("服务器版本")
    private String serverVersion;

    @Schema(description = "文档KEY")
    @ExcelProperty("文档KEY")
    private String docKey;

    @Schema(description = "文件下载地址", example = "https://localhost")
    @ExcelProperty("文件下载地址")
    private String fileUrl;

    @Schema(description = "文件地址")
    @ExcelProperty("文件地址")
    private String filePath;

    @Schema(description = "文件名称", example = "张三")
    @ExcelProperty("文件名称")
    private String fileName;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND, timezone = TIME_ZONE_DEFAULT)
    private Date createTime;

    private String creator;


    private String fileId;
    private String tableName;
    private String fileSuffix;


}